CMakeLists: drop PYTHON_INCLUDE_DIRS from interface#77
Open
tafilz wants to merge 1 commit intopybind:masterfrom
Open
CMakeLists: drop PYTHON_INCLUDE_DIRS from interface#77tafilz wants to merge 1 commit intopybind:masterfrom
tafilz wants to merge 1 commit intopybind:masterfrom
Conversation
Including PYTHON_INCLUDE_DIRS in the INTERFACE list caused a hard-coded
Python include directory (e.g. /usr/include/python3.13) to appear in the
generated Targets.cmake file. This resulted in a CMake configuration
error when the path did not exist:
Imported target "pybind11_json" includes non-existent path
"/usr/include/python3.13"
pybind11_json is header-only and does not use Python headers, so the
include path should not be exported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes
${PYTHON_INCLUDE_DIRS}from the target interface.In BitBake builds the variable added a hard‑coded Python include directory to the generated Targets.cmake file (e.g. in whinlatter with python3.13):
Which causes to fail in BitBake builds with:
Python‑related includes are already handled by pybind11.